sumcheck cycle analysis #4
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Findings
writeup: https://hackmd.io/@ceno-zkvm/Hy0Vz8bMxl
1. Sumcheck
To see how many cycles it takes to verify a sumcheck proof with nv = 2, degree = 3, you can run the cmd
1.1 Transcript
To observe 3 extension elements(equivalent to 12 felts), it takes around 230 cycles. 230 is larger than 9*12 because of the overhead in processing "2-dimensional loop" / "ext2felts conversion". (issue 1)
observe()
takes 6 or 9 cycles.a. if
inputs.len() = 7
, it will need 9 cycles;b. otherwise, it will need 6 cycles.
sample_ext
: takes 62 cycles (62 = 43 + 19) wherea. it called
DuplexChallengerVariable.sample()
by 4 times.b. it called
ext_from_base_slice()
by 1 time which takes 43 cycles. (issue 2)1.2 Interpolation
issue 3
2. Solution
https://hackmd.io/@ceno-zkvm/Hy0Vz8bMxl#2-Solutions